package fr.ydelouis.swipelistviewsample.view;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import fr.ydelouis.stdlvsample.R;
import fr.ydelouis.swipelistviewsample.MyItem;
import fr.ydelouis.swipelistviewsample.element.NotificationItem;

public class NotificationView extends RelativeLayout {
	private TextView tvDate;
	private TextView tvName;
	private TextView tvContent;

	public NotificationView(Context context) {
		super(context);
		View.inflate(context, R.layout.layout_notification, this);
		tvDate = (TextView) findViewById(R.id.tv_noti_date);
		tvName = (TextView) findViewById(R.id.tv_noti_name);
		tvContent = (TextView) findViewById(R.id.tv_noti_content);
	}

	public void bind(final NotificationItem notiItem) {
		tvDate.setText(notiItem.getDate());
		tvName.setText(notiItem.getName());
		tvContent.setText(notiItem.getBody());
	}
}
